<div class="box box-solid no-margin box-show">
    <div class="box-body">
        <div class="box-body table-responsive no-padding">
            <table class="table table-hover">
                <thead>
                <tr>
                    <th>SKU</th>
                    <th width="10%">产品名称</th>
                    <th>备货数量</th>
                    <th>采购数量</th>
                    <th>供应商单价</th>
                    <th>采购金额</th>
                    <th>已收货数量</th>
                </tr>
                </thead>
                <tbody>
                @foreach($purchase->order_detail->sortBy('psku_id') as $detail)
                    <tr>
                        <td>{{ $detail->sku->psku_code }}</td>
                        <td>{{ $detail->sku->psku_cn }}</td>
                        <td>{{ $detail->apply_num }}</td>
                        <td>{{ $detail->order_num }}</td>
                        <td>{{ $detail->supplier_price }}</td>
                        <td>{{ round(($detail->order_num ?: 0) * ($detail->supplier_price ?: 0),3) }}</td>
                        <td>{{ $detail->rgoods_num }}</td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        </div>
    </div>
</div>
